package cn.wolfcode.orderserver.web.controller;

import cn.wolfcode.orderserver.domain.Order;
import cn.wolfcode.orderserver.service.IOrderService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author JMJ
 * @date 2021/3/22 18:57
 */
@RestController
@Slf4j
public class OrderController {
    @Autowired
    private IOrderService orderService;


    @RequestMapping("/save")
    public Order order(Long uid, Long pid) {
        log.info("order------");
        return orderService.createOrder(uid, pid);
    }
}
